home *** CD-ROM | disk | FTP | other *** search
- on cleanChannels Begin, end
- repeat with var = Begin to end
- puppetSprite(var, 0)
- end repeat
- end
-
- on putBar num
- repeat with var = 5 to 33
- puppetSprite(var, 1)
- if var >= (22 + num) then
- set the visible of sprite var to 0
- end if
- end repeat
- updateStage()
- end
-
- on switchOn num
- global gPage
- putOn(the clickOn - 21)
- updateStage()
- end
-
- on putOn num
- global gPage, gMaxPage
- repeat with myVar = 0 to gMaxPage - 1
- set the castNum of sprite (22 + myVar) to 513 + (myVar * 2)
- end repeat
- set the castNum of sprite (22 + num - 1) to 513 + ((num - 1) * 2) + 1
- updateStage()
- set gPage to num
- end
-
- on setBookmark
- global gChapter, gSection, gPage, gCorrect, gBookPage, gBookFrame, gBookCorrect, gBookMovie
- go(#loop)
- set gBookFrame to the frame
- set gBookMovie to the movie
- set gBookCorrect to gCorrect
- set gBookPage to gPage
- end
-
- on findBookmark
- global gBookFrame, gBookMovie, gBookPage, gBookCorrect, gPage, gChapter, gCorrect
- if gBookMovie = EMPTY then
- exit
- end if
- cleanChannels(5, 48)
- if gBookMovie = the movie then
- go(gBookFrame)
- else
- go(gBookFrame, gBookMovie)
- end if
- set gPage to gBookPage
- set gCorrect to gBookCorrect
- if (gPage > 0) and (gChapter > 4) and (gChapter < 11) then
- putOn(gPage)
- end if
- end
-
- on setBookmark2
- global gChapter, gSection, gPage, gCorrect, gBookPage, gBookFrame, gBookCorrect, gBookMovie
- go(#loop)
- set gBookFrame to the frame
- set gBookMovie to the movie
- set gBookCorrect to gCorrect
- set gBookPage to gPage
- end
-
- on findBookmark2
- global gBookFrame, gBookMovie, gBookPage, gBookCorrect, gPage, gChapter, gCorrect
- if gBookMovie = EMPTY then
- exit
- end if
- cleanChannels(5, 48)
- if gBookMovie = the movie then
- go(gBookFrame)
- else
- go(gBookFrame, gBookMovie)
- end if
- set gPage to gBookPage
- set gCorrect to gBookCorrect
- if (gPage > 0) and (gChapter > 4) and (gChapter < 11) then
- putOn(gPage)
- end if
- end
-
- on getWhere myString
- global gPage
- updateStage()
- if myString = EMPTY then
- exit
- end if
- set myMovie to getFirst(myString)
- set head to the number of chars in myMovie + 2
- set myString to chars(myString, head, the number of chars in myString)
- set section to getFirst(myString)
- set head to the number of chars in section + 2
- set myString to chars(myString, head, the number of chars in myString)
- set page to getFirst(myString)
- set head to the number of chars in page + 2
- set myString to chars(myString, head, the number of chars in myString)
- if myString = EMPTY then
- set myMarker to myMovie & "." & section & "." & page
- else
- set myMarker to myMovie & "." & section & "." & page & "t"
- end if
- go(myMarker, myMovie & "-" & section & EMPTY)
- set gPage to value(page)
- if gPage > 0 then
- putOn(gPage)
- end if
- end
-
- on getFirst myString
- if (char 2 of myString = ".") or (char 2 of myString = EMPTY) then
- return chars(myString, 1, 1)
- end if
- if (char 3 of myString = ".") or (char 3 of myString = EMPTY) then
- return chars(myString, 1, 2)
- end if
- end
-
- on playEye mySound
- global gSound
- if gSound = 0 then
- set gSound to 1
- sound stop 1
- set the blend of sprite the clickOn to 70
- puppetSound(mySound)
- set the soundEnabled to 1
- updateStage()
- startTimer()
- repeat while the timer < 100
- nothing()
- end repeat
- repeat while soundBusy(1)
- if the mouseDown then
- exit repeat
- end if
- end repeat
- sound stop 1
- puppetSound(0)
- set the soundEnabled to 0
- if the type of sprite 4 = 16 then
- set the sound of cast the castNum of sprite 4 to 1
- set the volume of sprite 4 to 200
- end if
- else
- set gSound to 0
- sound stop 1
- set the soundEnabled to 0
- puppetSound(0)
- set the blend of sprite the clickOn to 100
- updateStage()
- if the type of sprite 4 = 16 then
- set the sound of cast the castNum of sprite 4 to 1
- set the volume of sprite 4 to 200
- end if
- end if
- end
-